package main
import (
	"fmt"
	"strconv"
)

func main() {
fmt.Println("请输入一串字符串")
	var str1 string
	fmt.Scan(&str1)


	count_int := 1  // 统计个数
	count_str := "" // 统计字符
	count_sum := "" // 存储最终结果

	// 遍历字符串
	for k, _ := range str1 {
		if k < len(str1)-1 {
			if str1[k] == str1[k+1] {
				count_int++
			} else {
				count_str = string(str1[k])
				count_sum += count_str + strconv.Itoa(count_int)

				count_int = 1
			}
		}
	}

	// 处理最后一个字符
	count_str = string(str1[len(str1)-1])
	count_sum += count_str + strconv.Itoa(count_int)
	fmt.Println(count_sum)
}